import { request } from '@/utils/request'

// 获取用户订单列表
export const getOrderList = (parmas, stateType, orderKey) =>
  request('/Memberorder/order_list', {
    page: parmas.page,

    per_page: parmas.per_page,
    state_type: stateType,
    order_key: orderKey
  })
// 获取订单信息
export const getOrderInfo = orderId =>
  request('/Memberorder/order_info', {
    order_id: orderId
  })
// 订单评价
export const saveOrderEvaluate = (orderId, result) =>
  request(
    '/Memberevaluate/save',
    Object.assign(
      {
        order_id: orderId
      },
      result
    )
  )
// 获取评价信息
export const getOrderEvaluateInfo = orderId =>
  request('/Memberevaluate/index', {
    order_id: orderId
  })
// 取消订单
export const cancelOrder = orderId =>
  request('/Memberorder/order_cancel', {
    order_id: orderId
  })
// 订单收货
export const receiveOrder = orderId =>
  request('/Memberorder/order_receive', {
    order_id: orderId
  })
// 物流跟踪
export const getOrderDeliver = orderId =>
  request('/Memberorder/search_deliver', {
    order_id: orderId
  })
